from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    temperature=0,
    openai_api_key="sk-rgymzddvnnrgwawnkevkdzlxkxfvhbviqgibbfgpvsyoqtur",
    openai_api_base="https://api.siliconflow.cn/v1",
    model="deepseek-ai/DeepSeek-R1-0528-Qwen3-8B"
)

answer = llm.invoke("1+1等于几")
print(answer)

"""
content='\n1+1等于2。这是一个基本的数学运算，在十进制系统中，结果是2。如果您有其他问题或需要更详细的解释，请随时告诉我！ 😊' additional_kwargs={'refusal': None} response_metadata={'token_usage': {'completion_tokens': 248, 'prompt_tokens': 8, 'total_tokens': 256, 'completion_tokens_details': {'accepted_prediction_tokens': None, 'audio_tokens': None, 'reasoning_tokens': 210, 'rejected_prediction_tokens': None}, 'prompt_tokens_details': None}, 'model_name': 'deepseek-ai/DeepSeek-R1-0528-Qwen3-8B', 'system_fingerprint': '', 'id': '01997e9ca305a09d8cd302df53396b8c', 'service_tier': None, 'finish_reason': 'stop', 'logprobs': None} id='run--35d1f11d-767f-4367-aaef-36d91d767836-0' usage_metadata={'input_tokens': 8, 'output_tokens': 248, 'total_tokens': 256, 'input_token_details': {}, 'output_token_details': {'reasoning': 210}}

"""
